package com.zbkj.admin.service;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageInfo;
import com.mybatisflex.core.service.IService;
import com.zbkj.admin.pojo.EbDividendArraignEntity;
import com.zbkj.admin.request.ArraignApplyRequest;
import com.zbkj.admin.request.PageParamRequest;
import com.zbkj.admin.response.EbDividendArraignResponse;
import com.zbkj.admin.vo.ArraignExcelVo;
import net.dreamlu.mica.core.result.R;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 积分提现审批记录 服务层。
 *
 * @author mybatis-flex-helper automatic generation
 * @since 1.0
 */
public interface EbDividendArraignService extends IService<EbDividendArraignEntity>, BaseService<EbDividendArraignEntity> {

    /**
     * 分红审批记录
     *
     * @param page 分页数据
     * @return 分页后数据
     */
    R<PageInfo<EbDividendArraignResponse>> page(Page<EbDividendArraignEntity> page, String examineAndApproveState, LocalDateTime startDate, LocalDateTime endDate);

    /**
     * 审批提现记录
     *
     * @param id      主键id
     * @param status  审批数据状态
     * @param remarks 备注
     * @return 是否通过
     */
    R<Boolean> toExamine(Long id, Integer status, String remarks);

    /**
     * 发起提现申请
     * */
    Boolean submitArraignApply(ArraignApplyRequest request);

    /**
     * 查询用户提现记录
     * */
    PageInfo<EbDividendArraignEntity> getUserArraignApplyList(PageParamRequest request);

    /**
     * 提现申请导出
     * @return 文件名称
     */
    List<ArraignExcelVo> exportArraign(String examineAndApproveState, LocalDateTime startDate, LocalDateTime endDate);

}